package com.decent.ejfadmin.monitor.controller;

import com.decent.ejfadmin.annotation.NoEntryLog;
import com.decent.ejfadmin.common.bean.OrderMonitor;
import com.decent.ejfadmin.common.bean.SupplyCardMessage;
import com.decent.ejfadmin.monitor.response.SupplyCardFace;
import com.decent.ejfadmin.monitor.response.SupplyCardSpeed;
import com.decent.ejfadmin.monitor.response.SupplyCardUser;
import com.decent.ejfadmin.monitor.service.MonitorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 监控
 *
 * @author weicx
 * @date 2018/08/21
 */
@RestController
@RequestMapping("MonitorController")
public class MonitorController {
    @Autowired
    private MonitorService monitorService;

    /**
     * 底部监控
     *
     * @return 返回
     */
    @NoEntryLog
    @RequestMapping(value = "queryOrderTotal")
    public OrderMonitor queryOrderTotal() {
        return monitorService.queryOrderTotal();
    }

    /**
     * 从缓存读取新批次卡
     *
     * @return 返回
     */
    @NoEntryLog
    @RequestMapping("getCacheData")
    public SupplyCardMessage getCacheData() {
        return monitorService.getCacheData();
    }

    /**
     * 销卡速度监控
     *
     * @return 返回
     */
    @RequestMapping("getSupplyCardSpeed")
    public List<SupplyCardSpeed> getSupplyCardSpeed() {
        return monitorService.getSupplyCardSpeed();
    }

    /**
     * 销卡面值监控
     *
     * @return 返回
     */
    @RequestMapping("getSupplyCardFace")
    public List<SupplyCardFace> getSupplyCardFace() {
        return monitorService.getSupplyCardFace();
    }

    /**
     * 提卡用户监控
     *
     * @return 返回信息
     */
    @RequestMapping("getSupplyCardUser")
    public SupplyCardUser getSupplyCardUser() {
        return monitorService.getSupplyCardUser();
    }

}
